#include "widget.h"
#include "ui_widget.h"
#include<QIcon>
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    QPushButton* button = new QPushButton(this);
    button->setText("hello!");
    connect(button,&QPushButton::clicked,this,&Widget::handleClick);
//    QIcon icon("d:/Pictures/Screenshots/BHDCIHECEGCHB-Ji4KAx2uHs.png");
    QIcon icon(":/BHDCIHECGBIAC-w0u1DWDwc7.png");
    setWindowIcon(icon);
//    exit(3000);
//    Sleep(3000);

}

Widget::~Widget()
{
    delete ui;
}

void Widget::handleClick()
{
    setWindowTitle("hello QT!");
    setWindowOpacity(0.7);
    Sleep(4000);
    Widget::close();
}

